using System;
using System.Collections.Generic;
using Volo.Abp.Application.Dtos;

namespace ERP.RepositoryManage.Dtos
{
    /// <summary>
    /// 装箱管理DTO
    /// </summary>
    public class PackingDto : EntityDto<int>
    {
        /// <summary>
        /// 装箱单编号
        /// </summary>
        public string PackingCode { get; set; } = string.Empty;

        /// <summary>
        /// 装箱日期
        /// </summary>
        public DateTime? PackingDate { get; set; }

        /// <summary>
        /// 销售订单编号
        /// </summary>
        public string? SaleOrderCode { get; set; }

        /// <summary>
        /// 发票编号
        /// </summary>
        public string? InvoiceCode { get; set; }

        /// <summary>
        /// 客户编码
        /// </summary>
        public string? CustomerCode { get; set; }

        /// <summary>
        /// 客户名称
        /// </summary>
        public string? CustomerName { get; set; }

        /// <summary>
        /// 产品编码
        /// </summary>
        public string? ProductCode { get; set; }

        /// <summary>
        /// 箱长
        /// </summary>
        public string? PackingLength { get; set; }

        /// <summary>
        /// 箱宽
        /// </summary>
        public string? PackingWidth { get; set; }

        /// <summary>
        /// 箱高
        /// </summary>
        public string? PackingHeight { get; set; }

        /// <summary>
        /// 净重
        /// </summary>
        public string? NetWeight { get; set; }

        /// <summary>
        /// 毛重
        /// </summary>
        public string? GrossWeight { get; set; }

        /// <summary>
        /// 单位重量
        /// </summary>
        public string? UnitWeight { get; set; }

        /// <summary>
        /// 检查员
        /// </summary>
        public string? Inspector { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public string? State { get; set; }

        /// <summary>
        /// 状态显示
        /// </summary>
        public string StateDisplay => State switch
        {
            "0" => "草稿",
            "1" => "已完成",
            _ => "未知"
        };

        /// <summary>
        /// 父级ID
        /// </summary>
        public int? ParentId { get; set; }

        /// <summary>
        /// 子箱列表
        /// </summary>
        public List<PackingDto> Children { get; set; } = new List<PackingDto>();

        /// <summary>
        /// 装箱明细列表
        /// </summary>
        public List<PackingDetailDto> Details { get; set; } = new List<PackingDetailDto>();
    }
} 